<?php /* Smarty version 2.6.26, created on 2010-05-18 21:16:04
         compiled from cms.editor.tpl */ ?>
<h1>Redigere nu: <span class="blue"><?php echo $this->_tpl_vars['site']['meta']['title']; ?>
</span></h1><div id="new_module_selector">    <div class="blueBg" style="float:left;width:100%;border-top:1px solid #fff;border-bottom:1px solid #777;">        <form method="post" action="">            <div class="enableUserTip" style="display:inline-block;">                <input class="noBorder btnLeft" type="submit" value="Tilføj modul" />                &nbsp;&nbsp;<select name="module" title="Vælg det modul du vil tilføje">                    <?php $_from = $this->_tpl_vars['modules']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['v']):
?>                    <?php if ($this->_tpl_vars['v']['createable']): ?>                    <option value="<?php echo $this->_tpl_vars['v']['path']; ?>
" title="<?php echo $this->_tpl_vars['v']['description']; ?>
"><?php echo $this->_tpl_vars['v']['title']; ?>
</option>                    <?php endif; ?>                    <?php endforeach; endif; unset($_from); ?>                </select>            </div>            <input type="hidden" name="q" value="command:do;action:module.add;page:<?php echo $this->_tpl_vars['site']['meta']['page']; ?>
;" />            <a rel="tipUp" title="Ret sidens navn, teksten i menuen osv." class="btnSkin altHover" style="float:right;padding:3px 10px;height:24px;line-height:24px;" href="?q=command:cms;view:cms.page.settings;page:<?php echo $this->_tpl_vars['site']['meta']['page']; ?>
;">gå til indstillinger</a>        </form>    </div></div><div class="clear"></div><div id="editor_area_container">    <form action="" enctype="multipart/form-data" method="post">        <ul id="module_list">            <?php $_from = $this->_tpl_vars['cms_editor_output']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['c_cms_editor']):
?>            <li class="module_item">                <div class="editor_area">                    <div class="header">                        <span class="title"><?php echo $this->_tpl_vars['c_cms_editor']['title']; ?>
</span>                        <a onclick="return confirm('Er du sikker på at du vil fjerne dette modul?');" href="?q=command:do;action:module.remove;module:<?php echo $this->_tpl_vars['c_cms_editor']['identifier']; ?>
;page:<?php echo $this->_tpl_vars['site']['meta']['page']; ?>
;"><img alt="Remove module" src="style/icons/Remove_Mini.png"/></a>                    </div>                    <div class="editor_wrapper">                        <div class="editor">                            <?php echo $this->_tpl_vars['c_cms_editor']['output']; ?>
                        </div>                    </div>                </div>            </li>            <?php endforeach; endif; unset($_from); ?>        </ul>        <div id="module_list_footer" class="blueBg">            <input type="hidden" name="dummy" value="?q=command:cms;view:cms.dashboard;" id="mod_field" />            <input type="submit" value="Gem og gå tilbage" onclick="$('#mod_field').attr('name','goto')" />        </div>    </form></div><script type="text/javascript">    var geturl = "<?php echo $this->_tpl_vars['LIBRARYURL']; ?>
/image.php";    var libraryDialogUrl = "<?php echo $this->_tpl_vars['libraryDialogUrl']; ?>
";    //<?php echo '    var libraryOpen = false;    var library = {};    /*     * if this is anything else than false it will be run as a function     * with the following values passed:     * function(imagepath,url to image.php grab file){ the function content here };     *     * This allows modules to use the image library to fetch images from the build-in system     * rather then having the user upload images in to the module     */    $(function(){        $(\'input[type="submit"]\').addClass(\'btnSkin noBorder\');        $(\'.markitup\').markItUp(mySettings);        $(\'.makeEditable\').markItUp(mySettings);        $("#module_list").sortable({            placeholder: \'module_item_placeholder\',            handle: \'.header\',            axis: \'y\',            containment: \'parent\',            forcePlaceholderSize: true ,            opacity: 0.9,            tolerance: \'pointer\'        });    });    miu.imageDialog = function(markItUp){        openLibrary(false);    }    function openLibrary(callback){        if (!libraryOpen){            libraryOpen = true;            var libraryElement = document.createElement("div");            libraryElement.setAttribute("id", "library");            document.body.appendChild(libraryElement);            library = $(libraryElement);            library.css({display:"none"});            library.load(libraryDialogUrl);            library.dialog({ autoOpen: false,width:660,height:580 });            var libraryInsertImageElement = document.createElement("div");            libraryInsertImageElement.setAttribute("id", "insertImageDialog");            document.body.appendChild(libraryInsertImageElement);            imageInsertDialog = $(libraryInsertImageElement);            imageInsertDialog.css({display:"none"});            imageInsertDialog.html(\'<div id="iWidthWrapper"><label style="width:100px;display:block;" for="iWidth">Bredde:</label><input name="iWidth"/></div>\\n\\                <div id="iHeightWrapper"><label style="width:100px;display:block;" for="iHeight">Højde:</label><input name="iHeight"/></div>\\n\\                <div id="iTitleWrapper"><label style="width:100px;display:block;" for="iTitle">Titel* :</label><input name="iTitle"/></div>\\n\\                <div></div>\');            $(imageInsertDialog).dialog({                titel:"IMAGEPATH",                autoOpen: false,                width:220,                height:240,                resizable: false,                modal: true,                buttons: {                    \'Insæt billede\': function() {                        var url_ekstra = "";                        var w = $("input[name=iWidth]").attr("value");                        var h = $("input[name=iHeight]").attr("value");                        var alt = $("input[name=iTitle]").attr("value");                        if (w != "")                            url_ekstra += "&width="+w;                        if (h != "")                            url_ekstra += "&height="+h;                        if(alt != ""){                            if (!library.insertCallback){                                window.console.log("Default library cllback called");                                library.defaultInsertCallback(imageInsertDialog.src+url_ekstra,alt);                            }                            else{                                window.console.log("custom library cllback called");                                library.insertCallback(imageInsertDialog.src+url_ekstra,alt);                            }                            $(this).dialog(\'close\');                        }else{                            alert("Billedet skal have en titel");                        }                    },                    "Anuller": function() {                        $(this).dialog(\'close\');                    }                }            });            library.defaultInsertCallback = function(url,alt){                $.markItUp({ openWith:\'![\'+alt+\'](\',replaceWith:url, closeWith:\' "\'+alt+\'")\' });            }        }        if (callback){            window.console.log("Using custom library callback");            library.insertCallback = callback;        }else{            window.console.log("Using default library callback");            library.insertCallback = false;        }        library.dialog("open");        library.dialog("option","title","Bibliotek");        //library.editor = markItUp;    }    function insertImage(image){        window.console.log("Insert image dialog called");        imageInsertDialog.src = image;        var name;        var aName = image.split("/");        var name = aName[aName.length-1];        imageInsertDialog.dialog("option","title",name);        imageInsertDialog.dialog("open");    }</script>'; ?>